'use strict'
import React, { Component, PropTypes } from 'react'


var CategoryNavbar = React.createClass({



    render() {

        let categorys = this.props.datas;

        let navbarTop = this.props.navbarTop;


        let handleClick = this.props.handleClick;


        return (

            <div className="list-navbar" style={{top: navbarTop, bottom: '46px'}}>
                <ul>

                    {
                        categorys.map(function(item,index){
                            let active =  index == 0?'active':'';
                            return  <li className={active} onClick={handleClick.bind(this,index)} ref="navbar"><span>{item.name}</span></li>

                        })
                    }

                </ul>
            </div>
        )

    }


})


export default CategoryNavbar;